<?php
// 把数据库相关配置做一个集中管理
$config = array(
  "host" => "localhost",
  "user" => "root",
  "pwd" => "",
  "dbname" => "1913"
);

// 跟数据库服务器建立连接
mysql_connect($config['host'], $config['user'], $config['pwd']);
// 进入数据库
mysql_select_db($config['dbname']);
// 传输过程中设置编码
mysql_query("set charset 'utf8'");
mysql_query("set character set 'utf8'");


?>